<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Tools/AdminPartner/index')}">合作单位列表</a></li>
			<li><a href="{:U('Tools/AdminPartner/add')}">添加合作单位</a></li>
		</ul>

		<form class="well form-search" method="post" action="{:U('AdminPartner/index')}">
			分类:
			<select name="partner_cid" style="width: 200px;" id="selected-cid">
				<option value=''>全部</option>
				<foreach name="cate" item="v">
					<php>$cid_select=$v['cate_id']==$partner_cid?"selected":"";</php><!--TODO-->
					<option value="{$v.cate_id}" {$cid_select}>{$v.cate_name}</option>
				</foreach>
			</select>
			<input type="text" name="partner_name" style="width: 300px;" value="{:I('request.partner_name/s')}" placeholder="请输入合作伙伴名称">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('AdminPartner/index')}">清空</a>
		</form>


		<form class="js-ajax-form" method="post">
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Tools/AdminPartnerCat/indexbat','type=order')}">排序</button>
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Tools/AdminPartnerCat/indexBat','type=delete')}">删除</button>
			</div>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">排序</th>
						<th width="50">ID</th>
						<th width="50">分类名称</th>
						<th width="200">合作伙伴名称</th>
						<th width="200">合作伙伴图片</th>
						<th width="100">合作伙伴链接</th>
						<th width="100">操作</th>
					</tr>
				</thead>
				<foreach name="lists" item="v">
				<tr>
					<td style="vertical-align:middle;"><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$v['partner_id']}" title="ID:{$v['partner_id']}"></td>
					<td><input name="orderby[{$v['partner_id']}]" class="input input-order" type="text" size="3" value="{$v['orderby']}" /></td>

					<td>{$v.partner_id}</td>
					<td>{$v.cate_name}</td>
					<td>{$v.partner_name}</td>
					<td>
						<if condition="!empty($v['partner_pic'])">
							<a href="{:sp_get_image_preview_url($v['partner_pic'])}" target="_blank">查看</a>
						</if>
					</td>
					<td><a href="{$v.partner_url}" target="_blank">{$v.partner_url}</a></td>
					<td>
						<a href="{:U('Tools/AdminPartner/edit','partner_id='.$v['partner_id'])}">编辑</a> |
						<a href="{:U('Tools/AdminPartner/delete','partner_id='.$v['partner_id'])}" class="js-ajax-delete">删除</a>
					</td>
				</tr>
				</foreach>
				<tfoot>
					<tr>
						<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">排序</th>
						<th width="50">ID</th>
						<th width="50">分类名称</th>
						<th width="200">合作伙伴名称</th>
						<th width="200">合作伙伴图片</th>
						<th width="100">合作伙伴链接</th>
						<th width="100">操作</th>
					</tr>
				</tfoot>
			</table>


			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Tools/AdminPartnerCat/indexbat','type=order')}">排序</button>
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Tools/AdminPartnerCat/indexBat','type=delete')}">删除</button>
			</div>
		</form>


		<nav>
			<ul class="pagination">
				{$page}
			</ul>
		</nav>


	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>